<div class="navbar navbar-fixed-top my-navbar-top">   
    <div class="container">
        <a href="<?php echo $this->baseUrl?>" class="navbar-brand">
            <?php echo $this->domain?>
        </a>
        <button onClick="scrollToAnchor('#block-login')" class="navbar-toggle" type="button" data-toggle="collapse" data-target=".my-navbar-collapse">
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
        </button>

        <div class="my-navbar-collapse">


        </div>


        <div class="nav-collapse collapse">
            <ul class="nav navbar-nav my-navbar-left">
                <?php /*
                    <li class="dropdown" id="chaotienganh">
                    <a href="#" data-hover="dropdown" class="dropdown-toggle" data-toggle="dropdown" data-delay="0" data-close-others="false">
                    Chào tiếng anh <b class="caret"></b>
                    </a>
                    <ul class="dropdown-menu">
                    <li><a href="#">Làm bài tập</a></li>
                    <li><a href="#">Thi thử</a></li>
                    </ul>
                    </li>  
                    <li class="dropdown" id="hangve">
                    <a href="abc" data-hover="dropdown" class="dropdown-toggle" data-toggle="dropdown" data-delay="0" data-close-others="false">
                    Mua & Bán <b class="caret"></b>
                    </a>
                    <ul class="dropdown-menu">
                    <li><a href="#">Đăng tin rao vặt</a></li>
                    <!--                        <li class="divider"></li>-->
                    <li><a href="#">Khu buôn bán</a></li>
                    </ul>
                    </li>   
                */?>
                <li class="dropdown <?php if($this->topNav == 'hehe'):?>active<?php endif?>" id="hehe">
                    <a href="abc" data-hover="dropdown" class="dropdown-toggle" data-toggle="dropdown" data-delay="0" data-close-others="false">
                        Giải trí 5 p' <b class="caret"></b>
                    </a>
                    <ul class="dropdown-menu">
                        <li><a href="<?php echo $this->createUrl('/hehe/web/image/index')?>">Ảnh vui</a></li>
                        <li><a href="<?php echo $this->createUrl('/hehe/web/video/index')?>">Video nhộn</a></li>
                        <li><a href="<?php echo $this->createUrl('/hehe/web/joke/index')?>">Truyện cười</a></li>
                        <?php if(!empty($this->userInfo) && $this->userInfo->isMod):?>
                            <li class="divider"></li>
                            <li><a href="<?php echo $this->createUrl('/hehe/web/image/index', array('type' => 'review'))?>">Duyệt ảnh</a></li>
                            <li><a href="<?php echo $this->createUrl('/hehe/web/video/index', array('type' => 'review'))?>">Duyệt video</a></li>
                            <li><a href="<?php echo $this->createUrl('/hehe/web/joke/index', array('type' => 'review'))?>">Duyệt truyện</a></li>
                            <li><a href="<?php echo $this->createUrl('/hehe/web/crawl/jokeVnexpress')?>">Crawl Vnexpress's Jokes</a></li>
                            <?php endif?>
                    </ul>
                </li> 
               <?php /*
                <li>
                    <a href="#">
                        Trợ giúp 
                    </a>
                </li> 
                */?>             
            </ul>
            <ul class="nav navbar-nav pull-right my-navbar-right">
                <li class="dropdown <?php if($this->topNav == 'user'):?>active<?php endif?>">

                    <?php if($this->user):?>
                        <a data-toggle="dropdown" class="dropdown-toggle" data-hover="dropdown" data-delay="0" data-close-others="false" href="#">
                            <?php echo $this->user->name?> <b class="caret"></b>
                        </a>
                        <ul class="dropdown-menu">
                            <li><a href="<?php echo $this->createUrl('/user/page/update')?>">Cập nhật tài khoản</a></li>
                            <li><a href="<?php echo $this->createUrl('/user/page/managePhone')?>">Quản lý SĐT</a></li>
                            <li><a href="<?php echo $this->createUrl('/user/page/manageEmail')?>">Quản lý Email & Openid</a></li>
                            <li><a href="<?php echo $this->createUrl('/user/page/password')?>"><?php echo $this->user->password ? 'Đổi mật khẩu' : 'Tạo mật khẩu'?></a></li>

                            <li class="divider"></li>
                            <li><a href="<?php echo $this->createUrl('/user/page/logout')?>">Thoát</a></li>
                        </ul>

                        <?php else:?>
                        <a data-toggle="dropdown" class="dropdown-toggle" data-hover="dropdown" data-delay="0" data-close-others="false" href="#">
                            Tài khoản <b class="caret"></b>
                        </a>
                        <div class="dropdown-menu my-dropdown-login">
                            <div class="col">
                                <?php echo CHtml::beginForm(Yii::app()->createAbsoluteUrl('/user/page/login'), 'post', array(
                                        'id'=>'login-form-navbar',
                                        'class' => 'form-horizontal my-form'   
                                    )); ?>

                                <div class="margintop5">
                                    <?php echo CHtml::textField('LoginForm[username]', null, array('placeholder'=> 'Email/Số ĐT','maxlength'=>255, 'class' => 'input-small'));?>
                                </div> 

                                <div class="margintop5">
                                    <?php echo CHtml::passwordField('LoginForm[password]', null, array('placeholder'=> 'Mật khẩu','maxlength'=>255, 'class' => 'input-small'));?>
                                </div>

                                <div class="margintop5 clearfix">
                                    <div class="col-lg-6 pull-left">
                                        <button type="submit" class="btn btn-primary btn-small">
                                            <i class="icon-signin"></i> Đăng nhập
                                        </button>
                                    </div>    
                                    <div class="col-lg-6 my-openid pull-right">
                                        <div class="with">với</div>
                                        <a href="<?php echo $this->createUrl('/user/page/login', array('service' => 'facebook'))?>" class="openid_popup decoration-none" rel="tooltip" data-placement="top" title="Đăng nhập bằng tài khoản Facebook">
                                            <i class="icon-facebook-sign"></i>
                                        </a>
                                        &nbsp;
                                        <a href="<?php echo $this->createUrl('/user/page/login', array('service' => 'google'))?>" class="openid_popup decoration-none" rel="tooltip" data-placement="top" title="Đăng nhập bằng tài khoản Google" >
                                            <i class="icon-google-plus-sign"></i>
                                        </a>
                                    </div> 
                                </div>
                                <?php echo CHtml::endForm(); ?>

                                <hr/>

                                <div class="pull-right">
                                    <ul class="my-link col-lg-12">
                                        <li><a class="decoration-none" href="<?php echo $this->createUrl('/user/page/create')?>"><span class="label label-success">Đăng ký</span></a></li>
                                        <li><a class="decoration-none" href="<?php echo $this->createUrl('/user/page/forgot')?>"><span class="label label-warning">Quên mật khẩu</span></a></li>
                                    </ul>
                                </div>


                            </div>

                        </div>
                        <?php endif?>
                </li>

            </ul>
        </div>
    </div>
</div>

